package tech.runchen.gz5055.oms.modules.system.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 订单信息表
 * </p>
 *
 * @author zzj
 * @since 2023-10-10
 */
@Getter
@Setter
@TableName("order_tb")
@ApiModel(value = "OrderEntity对象", description = "订单信息表")
public class OrderEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("创建人")
    private String createBy;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty("更新人")
    private String updateBy;

    @ApiModelProperty("更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty("订单编号")
    private String orderNumber;

    @ApiModelProperty("订单类型（0-系统订单 1-电话订单")
    private Integer orderType;

    @ApiModelProperty("患者名称")
    private String patientName;

    @ApiModelProperty("患者卡号")
    private String patientCode;

    @ApiModelProperty("下单时间")
    private Long orderTime;

    @ApiModelProperty("下单用户ID")
    private Long orderUserId;

    @ApiModelProperty("下单用户昵称")
    private String orderUserName;

    @ApiModelProperty("确认时间")
    private Long confirmOrderTime;

    @ApiModelProperty("确认用户ID")
    private Long confirmOrderUserId;

    @ApiModelProperty("确认用户昵称")
    private String confirmOrderUserName;

    @ApiModelProperty("发货时间")
    private Long shippedTime;

    @ApiModelProperty("发货用户昵称")
    private Long shippedUserId;

    @ApiModelProperty("发货用户昵称")
    private String shippedUserName;

    @ApiModelProperty("配送地址")
    private String deliveryAddress;

    @ApiModelProperty("配送地址ID")
    private Long deliveryAddressId;

    @ApiModelProperty("配送方式（0-机器 1-人工")
    private Integer deliveryMethod;

    @ApiModelProperty("配送人")
    private String deliveryBy;

    @ApiModelProperty("签收用户ID")
    private Long signUserId;

    @ApiModelProperty("签收用户昵称")
    private String signUserName;

    @ApiModelProperty("完成时间")
    private Long doneTime;

    @ApiModelProperty("订单状态（0-下单 1-确认 2-装车 3-签收 4-取消")
    private Integer status;

    @ApiModelProperty("退货次数")
    private Integer returnNumber;

    @ApiModelProperty("删除标志（0代表存在 2代表删除）")
    private String delFlag;

    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("订单明细")
    @TableField(exist = false)
    private List<OrderDetailEntity> orderDetailList;
}
